'use strict';


/**
 * getSourceByPid of infoSource
 */
exports.getSourceByPid = function(req, res) {
    var pid=req.body.pid;

    req.getConnection(function(err, conn) {
        if (err) {
            return res.send(401);
        } else {
            conn.query('select * from info_source WHERE pid = '+pid, function(err,result) {
                if (err) {
                    return res.json(false);
                } else {
                    res.json(result);
                }
            });
        }
    });
};
